//
//  TopicViewCell.m
//  A段项目,漫画
//
//  Created by dlios on 15-4-22.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "TopicViewCell.h"
#define WIDTH [[UIScreen mainScreen] bounds].size.width
#define HEIGHT self.contentView.frame.size.height
@implementation TopicViewCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.backeView = [[UIImageView alloc]init];
        self.backeView.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:self.backeView];
        [_backeView release];
        
        self.topicView = [[UIImageView alloc]init];
        [self.backeView addSubview:self.topicView];
//        self.topicView.backgroundColor = [UIColor redColor];
        [_topicView release];
//        self.labelOne.tag = 10086;
        
        self.labelTop = [[UILabel alloc]init];
        [self.backeView addSubview:self.labelTop];
        self.labelTop.backgroundColor = [UIColor yellowColor];
        [_labelTop release];
        
//        self.labelTow = [[UILabel alloc]init];
//        [self.backeView addSubview:self.labelTow];
//        self.labelTow.backgroundColor = [UIColor orangeColor];
//        [_labelTow release];
//        
//        self.labelThree = [[UILabel alloc]init];
//        [self.backeView addSubview:self.labelThree];
//        self.labelThree.backgroundColor = [UIColor blueColor];
//        [_labelThree release];
        
    }
    return self;
}


#pragma mark 视图布局
-(void)layoutSubviews
{
    [super layoutSubviews];
    self.backeView.frame = CGRectMake(0, 0, WIDTH, HEIGHT);
    
    self.topicView.frame = CGRectMake(5, 5, WIDTH, HEIGHT / 6 * 5);
    
    self.labelTop.frame = CGRectMake(5, HEIGHT / 6 * 5, WIDTH, HEIGHT / 6);
//    
//    self.labelTow.frame = CGRectMake(5, HEIGHT / 6 * 4, WIDTH, HEIGHT / 6);
//    
//    self.labelThree.frame = CGRectMake(5, HEIGHT / 6 * 5, WIDTH, HEIGHT / 6);
    
}

//- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
//    [super touchesBegan:touches withEvent:event];
//    UITouch *touch = [touches anyObject];
//    UILabel *la = (UILabel *)touch.view;
//    NSLog(@"%ld",la.tag);
//    
////    if (selectedLabel.tag == 10086) {
////        NSLog(@"点击了");
////    }
//    
//}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
